export function errorMessageBox(arr) {
  // console.log(arr)
  if (arr instanceof Array) {
    let str = '<table class="errorMessageBox" border cellspacing="0" cellpadding="5" style=" width: 100%;text-align: center;">'
    str += '<tr><th>行数</th><th>失败原因</th></tr>'
    for (let i = 0; i < arr.length; i++) {
      const data = arr[i].data;
      const msg = arr[i].msg
      str += '<tr><td>' + data + '</td>'
      str += '<td style="color:red">' + msg + '</td></tr>'
    }
    str += '</table>'
  //   Vue.component("hello-component",{
  //     props:["arr"],
  //     template :"<div ><h1>组件定义之全局组件</h1><h4>{{message}}</h4></div>"
  // });
    return str
  } else {
    return arr
  }
}
